/*    */ package com.umeng.analytics.onlineconfig;
/*    */ 
/*    */ import com.umeng.analytics.g;
/*    */ import com.umeng.common.Log;
/*    */ import com.umeng.common.net.u;
/*    */ import org.json.JSONObject;
/*    */ 
/*    */ public class b extends u
/*    */ {
/* 17 */   public JSONObject a = null;
/*    */ 
/* 19 */   boolean b = false;
/*    */ 
/* 21 */   int c = -1;
/* 22 */   int d = -1;
/*    */   String e;
/* 26 */   private final String f = "config_update";
/* 27 */   private final String g = "report_policy";
/* 28 */   private final String h = "online_params";
/* 29 */   private final String i = "last_config_time";
/* 30 */   private final String j = "report_interval";
/*    */ 
/*    */   public b(JSONObject paramJSONObject) {
/* 33 */     super(paramJSONObject);
/*    */ 
/* 35 */     if (paramJSONObject == null) {
/* 36 */       return;
/*    */     }
/*    */ 
/* 39 */     a(paramJSONObject);
/*    */ 
/* 41 */     a();
/*    */   }
/*    */ 
/*    */   private void a(JSONObject paramJSONObject) {
/*    */     try {
/* 46 */       if ((!paramJSONObject.has("config_update")) || (paramJSONObject.getString("config_update").toLowerCase().equals("no"))) {
/* 47 */         return;
/*    */       }
/*    */ 
/* 50 */       if (paramJSONObject.has("report_policy")) {
/* 51 */         this.c = paramJSONObject.getInt("report_policy");
/* 52 */         this.d = (paramJSONObject.optInt("report_interval") * 1000);
/* 53 */         this.e = paramJSONObject.optString("last_config_time");
/*    */       } else {
/* 55 */         Log.e("MobclickAgent", " online config fetch no report policy");
/*    */       }
/*    */ 
/* 58 */       this.a = paramJSONObject.optJSONObject("online_params");
/*    */ 
/* 60 */       this.b = true;
/*    */     } catch (Exception localException) {
/* 62 */       Log.e("MobclickAgent", "fail to parce online config response", localException);
/*    */     }
/*    */   }
/*    */ 
/*    */   private void a() {
/* 67 */     if ((this.c < 0) || (this.c > 6)) {
/* 68 */       this.c = 1;
/*    */     }
/*    */ 
/* 71 */     if ((this.c == 6) && (this.d <= 0))
/* 72 */       this.d = g.h;
/*    */   }
/*    */ }

/* Location:           C:\Users\Administrator\Desktop\umeng_sdk.jar
 * Qualified Name:     com.umeng.analytics.onlineconfig.b
 * JD-Core Version:    0.6.2
 */